3.1.58 \(\int \frac {\tan ^2(x)}{(a+b \cot ^2(x))^{5/2}} \, dx\) [58]

3.1.58.1 Optimal result
3.1.58.2 Mathematica [C] (warning: unable to verify)
3.1.58.3 Rubi [A] (verified)
3.1.58.4 Maple [B] (warning: unable to verify)
3.1.58.5 Fricas [B] (verification not implemented)
3.1.58.6 Sympy [F]
3.1.58.7 Maxima [F]
3.1.58.8 Giac [B] (verification not implemented)
3.1.58.9 Mupad [F(-1)]

3.1.58.1 Optimal result

Integrand size = 17, antiderivative size = 141 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\frac {\arctan \left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )}{(a-b)^{5/2}}+\frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}+\frac {(7 a-4 b) b \tan (x)}{3 a^2 (a-b)^2 \sqrt {a+b \cot ^2(x)}}+\frac {(a-4 b) (3 a-2 b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a^3 (a-b)^2} \]

output
arctan(cot(x)*(a-b)^(1/2)/(a+b*cot(x)^2)^(1/2))/(a-b)^(5/2)+1/3*b*tan(x)/a 
/(a-b)/(a+b*cot(x)^2)^(3/2)+1/3*(7*a-4*b)*b*tan(x)/a^2/(a-b)^2/(a+b*cot(x) 
^2)^(1/2)+1/3*(a-4*b)*(3*a-2*b)*(a+b*cot(x)^2)^(1/2)*tan(x)/a^3/(a-b)^2
 
3.1.58.2 Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 8.16 (sec) , antiderivative size = 1450, normalized size of antiderivative = 10.28 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx =\text {Too large to display} \]

input
Integrate[Tan[x]^2/(a + b*Cot[x]^2)^(5/2),x]
 
output
(Sin[x]^2*((-16*b^3*(Cot[x] + Cot[x]^3)^2)/(a*(a - b)^2) + (40*b*Csc[x]^2) 
/(a - b) + (160*b^2*Cot[x]^2*Csc[x]^2)/(3*a*(a - b)) + (64*b^3*Cot[x]^4*Cs 
c[x]^2)/(3*a^2*(a - b)) - (40*b^2*Csc[x]^4)/(a - b)^2 + (92*(a - b)*Cos[x] 
^2*Hypergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a])/(105*a) + (124*(a - 
 b)*b*Cos[x]^2*Cot[x]^2*Hypergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a] 
)/(35*a^2) + (152*(a - b)*b^2*Cos[x]^2*Cot[x]^4*Hypergeometric2F1[2, 2, 9/ 
2, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (176*(a - b)*b^3*Cos[x]^2*Cot[x]^6*Hy 
pergeometric2F1[2, 2, 9/2, ((a - b)*Cos[x]^2)/a])/(105*a^4) + (24*(a - b)* 
Cos[x]^2*HypergeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35 
*a) + (16*(a - b)*b*Cos[x]^2*Cot[x]^2*HypergeometricPFQ[{2, 2, 2}, {1, 9/2 
}, ((a - b)*Cos[x]^2)/a])/(7*a^2) + (88*(a - b)*b^2*Cos[x]^2*Cot[x]^4*Hype 
rgeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (32*( 
a - b)*b^3*Cos[x]^2*Cot[x]^6*HypergeometricPFQ[{2, 2, 2}, {1, 9/2}, ((a - 
b)*Cos[x]^2)/a])/(35*a^4) + (16*(a - b)*Cos[x]^2*HypergeometricPFQ[{2, 2, 
2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2)/a])/(105*a) + (16*(a - b)*b*Cos[x]^ 
2*Cot[x]^2*HypergeometricPFQ[{2, 2, 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2) 
/a])/(35*a^2) + (16*(a - b)*b^2*Cos[x]^2*Cot[x]^4*HypergeometricPFQ[{2, 2, 
 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x]^2)/a])/(35*a^3) + (16*(a - b)*b^3*Cos 
[x]^2*Cot[x]^6*HypergeometricPFQ[{2, 2, 2, 2}, {1, 1, 9/2}, ((a - b)*Cos[x 
]^2)/a])/(105*a^4) + (20*a*Sec[x]^2)/(3*(a - b)) - (30*a*b*Csc[x]^2*Sec...
 
3.1.58.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.14, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.471, Rules used = {3042, 4153, 374, 441, 445, 27, 291, 216}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan \left (x+\frac {\pi }{2}\right )^2 \left (a+b \tan \left (x+\frac {\pi }{2}\right )^2\right )^{5/2}}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle -\int \frac {\tan ^2(x)}{\left (\cot ^2(x)+1\right ) \left (b \cot ^2(x)+a\right )^{5/2}}d\cot (x)\)

\(\Big \downarrow \) 374

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\int \frac {\left (-4 b \cot ^2(x)+3 a-4 b\right ) \tan ^2(x)}{\left (\cot ^2(x)+1\right ) \left (b \cot ^2(x)+a\right )^{3/2}}d\cot (x)}{3 a (a-b)}\)

\(\Big \downarrow \) 441

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\frac {\int \frac {\left ((a-4 b) (3 a-2 b)-2 (7 a-4 b) b \cot ^2(x)\right ) \tan ^2(x)}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)}{a (a-b)}-\frac {b (7 a-4 b) \tan (x)}{a (a-b) \sqrt {a+b \cot ^2(x)}}}{3 a (a-b)}\)

\(\Big \downarrow \) 445

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\frac {-\frac {\int \frac {3 a^3}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)}{a}-\frac {(a-4 b) (3 a-2 b) \tan (x) \sqrt {a+b \cot ^2(x)}}{a}}{a (a-b)}-\frac {b (7 a-4 b) \tan (x)}{a (a-b) \sqrt {a+b \cot ^2(x)}}}{3 a (a-b)}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\frac {-3 a^2 \int \frac {1}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)-\frac {(a-4 b) (3 a-2 b) \tan (x) \sqrt {a+b \cot ^2(x)}}{a}}{a (a-b)}-\frac {b (7 a-4 b) \tan (x)}{a (a-b) \sqrt {a+b \cot ^2(x)}}}{3 a (a-b)}\)

\(\Big \downarrow \) 291

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\frac {-3 a^2 \int \frac {1}{1-\frac {(b-a) \cot ^2(x)}{b \cot ^2(x)+a}}d\frac {\cot (x)}{\sqrt {b \cot ^2(x)+a}}-\frac {(a-4 b) (3 a-2 b) \tan (x) \sqrt {a+b \cot ^2(x)}}{a}}{a (a-b)}-\frac {b (7 a-4 b) \tan (x)}{a (a-b) \sqrt {a+b \cot ^2(x)}}}{3 a (a-b)}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {b \tan (x)}{3 a (a-b) \left (a+b \cot ^2(x)\right )^{3/2}}-\frac {\frac {-\frac {3 a^2 \arctan \left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )}{\sqrt {a-b}}-\frac {(a-4 b) (3 a-2 b) \tan (x) \sqrt {a+b \cot ^2(x)}}{a}}{a (a-b)}-\frac {b (7 a-4 b) \tan (x)}{a (a-b) \sqrt {a+b \cot ^2(x)}}}{3 a (a-b)}\)

input
Int[Tan[x]^2/(a + b*Cot[x]^2)^(5/2),x]
 
output
(b*Tan[x])/(3*a*(a - b)*(a + b*Cot[x]^2)^(3/2)) - (-(((7*a - 4*b)*b*Tan[x] 
)/(a*(a - b)*Sqrt[a + b*Cot[x]^2])) + ((-3*a^2*ArcTan[(Sqrt[a - b]*Cot[x]) 
/Sqrt[a + b*Cot[x]^2]])/Sqrt[a - b] - ((a - 4*b)*(3*a - 2*b)*Sqrt[a + b*Co 
t[x]^2]*Tan[x])/a)/(a*(a - b)))/(3*a*(a - b))
 

3.1.58.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 374
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[(-b)*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q 
 + 1)/(a*e*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) 
 Int[(e*x)^m*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[b*c*(m + 1) + 2*(b*c - 
a*d)*(p + 1) + d*b*(m + 2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b, 
c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IntBinomialQ[a, b, 
 c, d, e, m, 2, p, q, x]
 

rule 441
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^(m + 1)*(a 
+ b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*g*2*(b*c - a*d)*(p + 1))), x] + Si 
mp[1/(a*2*(b*c - a*d)*(p + 1))   Int[(g*x)^m*(a + b*x^2)^(p + 1)*(c + d*x^2 
)^q*Simp[c*(b*e - a*f)*(m + 1) + e*2*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m 
 + 2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m, q}, 
 x] && LtQ[p, -1]
 

rule 445
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ 
.)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p 
+ 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) 
 Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c 
+ a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 
2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
3.1.58.4 Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(933\) vs. \(2(123)=246\).

Time = 1.56 (sec) , antiderivative size = 934, normalized size of antiderivative = 6.62

method result size
default \(\text {Expression too large to display}\) \(934\)

input
int(tan(x)^2/(a+b*cot(x)^2)^(5/2),x,method=_RETURNVERBOSE)
 
output
1/6*4^(1/2)/(-a+b)^(1/2)/(a-b)^2/a^3*(-3*(-a+b)^(1/2)*a^2*b^2*(1-cos(x))^8 
*csc(x)^8+14*(-a+b)^(1/2)*a*b^3*(1-cos(x))^8*csc(x)^8-8*(-a+b)^(1/2)*b^4*( 
1-cos(x))^8*csc(x)^8-24*(-a+b)^(1/2)*a^3*b*(1-cos(x))^6*csc(x)^6+96*(-a+b) 
^(1/2)*a^2*b^2*(1-cos(x))^6*csc(x)^6-104*(-a+b)^(1/2)*a*b^3*(1-cos(x))^6*c 
sc(x)^6+32*(-a+b)^(1/2)*b^4*(1-cos(x))^6*csc(x)^6+3*ln(4*(a*(1-cos(x))^2*c 
sc(x)^2-b*(1-cos(x))^2*csc(x)^2+(-a+b)^(1/2)*(b*(1-cos(x))^4*csc(x)^4+4*a* 
(1-cos(x))^2*csc(x)^2-2*b*(1-cos(x))^2*csc(x)^2+b)^(1/2)-a+b)/((1-cos(x))^ 
2*csc(x)^2+1))*(b*(1-cos(x))^4*csc(x)^4+4*a*(1-cos(x))^2*csc(x)^2-2*b*(1-c 
os(x))^2*csc(x)^2+b)^(3/2)*a^3*(1-cos(x))^2*csc(x)^2-48*(-a+b)^(1/2)*a^4*( 
1-cos(x))^4*csc(x)^4+144*(-a+b)^(1/2)*a^3*b*(1-cos(x))^4*csc(x)^4-234*(-a+ 
b)^(1/2)*a^2*b^2*(1-cos(x))^4*csc(x)^4+180*(-a+b)^(1/2)*a*b^3*(1-cos(x))^4 
*csc(x)^4-48*(-a+b)^(1/2)*b^4*(1-cos(x))^4*csc(x)^4-3*ln(4*(a*(1-cos(x))^2 
*csc(x)^2-b*(1-cos(x))^2*csc(x)^2+(-a+b)^(1/2)*(b*(1-cos(x))^4*csc(x)^4+4* 
a*(1-cos(x))^2*csc(x)^2-2*b*(1-cos(x))^2*csc(x)^2+b)^(1/2)-a+b)/((1-cos(x) 
)^2*csc(x)^2+1))*(b*(1-cos(x))^4*csc(x)^4+4*a*(1-cos(x))^2*csc(x)^2-2*b*(1 
-cos(x))^2*csc(x)^2+b)^(3/2)*a^3-24*(-a+b)^(1/2)*a^3*b*(1-cos(x))^2*csc(x) 
^2+96*(-a+b)^(1/2)*a^2*b^2*(1-cos(x))^2*csc(x)^2-104*(-a+b)^(1/2)*a*b^3*(1 
-cos(x))^2*csc(x)^2+32*(-a+b)^(1/2)*b^4*(1-cos(x))^2*csc(x)^2-3*(-a+b)^(1/ 
2)*a^2*b^2+14*(-a+b)^(1/2)*a*b^3-8*(-a+b)^(1/2)*b^4)*(b*(1-cos(x))^4*csc(x 
)^4+4*a*(1-cos(x))^2*csc(x)^2-2*b*(1-cos(x))^2*csc(x)^2+b)/((1-cos(x))^...
 
3.1.58.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 297 vs. \(2 (123) = 246\).

Time = 0.34 (sec) , antiderivative size = 647, normalized size of antiderivative = 4.59 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\left [-\frac {3 \, {\left (a^{5} \tan \left (x\right )^{4} + 2 \, a^{4} b \tan \left (x\right )^{2} + a^{3} b^{2}\right )} \sqrt {-a + b} \log \left (-\frac {a^{2} \tan \left (x\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \left (x\right )^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \left (x\right )^{3} - {\left (a - 2 \, b\right )} \tan \left (x\right )\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}}}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) - 4 \, {\left (3 \, {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \tan \left (x\right )^{5} + 3 \, {\left (2 \, a^{4} b - 9 \, a^{3} b^{2} + 11 \, a^{2} b^{3} - 4 \, a b^{4}\right )} \tan \left (x\right )^{3} + {\left (3 \, a^{3} b^{2} - 17 \, a^{2} b^{3} + 22 \, a b^{4} - 8 \, b^{5}\right )} \tan \left (x\right )\right )} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}}}{12 \, {\left (a^{6} b^{2} - 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} - a^{3} b^{5} + {\left (a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}\right )} \tan \left (x\right )^{4} + 2 \, {\left (a^{7} b - 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} - a^{4} b^{4}\right )} \tan \left (x\right )^{2}\right )}}, \frac {3 \, {\left (a^{5} \tan \left (x\right )^{4} + 2 \, a^{4} b \tan \left (x\right )^{2} + a^{3} b^{2}\right )} \sqrt {a - b} \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )}{a \tan \left (x\right )^{2} - a + 2 \, b}\right ) + 2 \, {\left (3 \, {\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \tan \left (x\right )^{5} + 3 \, {\left (2 \, a^{4} b - 9 \, a^{3} b^{2} + 11 \, a^{2} b^{3} - 4 \, a b^{4}\right )} \tan \left (x\right )^{3} + {\left (3 \, a^{3} b^{2} - 17 \, a^{2} b^{3} + 22 \, a b^{4} - 8 \, b^{5}\right )} \tan \left (x\right )\right )} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}}}{6 \, {\left (a^{6} b^{2} - 3 \, a^{5} b^{3} + 3 \, a^{4} b^{4} - a^{3} b^{5} + {\left (a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}\right )} \tan \left (x\right )^{4} + 2 \, {\left (a^{7} b - 3 \, a^{6} b^{2} + 3 \, a^{5} b^{3} - a^{4} b^{4}\right )} \tan \left (x\right )^{2}\right )}}\right ] \]

input
integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="fricas")
 
output
[-1/12*(3*(a^5*tan(x)^4 + 2*a^4*b*tan(x)^2 + a^3*b^2)*sqrt(-a + b)*log(-(a 
^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan( 
x)^3 - (a - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(ta 
n(x)^4 + 2*tan(x)^2 + 1)) - 4*(3*(a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*tan 
(x)^5 + 3*(2*a^4*b - 9*a^3*b^2 + 11*a^2*b^3 - 4*a*b^4)*tan(x)^3 + (3*a^3*b 
^2 - 17*a^2*b^3 + 22*a*b^4 - 8*b^5)*tan(x))*sqrt((a*tan(x)^2 + b)/tan(x)^2 
))/(a^6*b^2 - 3*a^5*b^3 + 3*a^4*b^4 - a^3*b^5 + (a^8 - 3*a^7*b + 3*a^6*b^2 
 - a^5*b^3)*tan(x)^4 + 2*(a^7*b - 3*a^6*b^2 + 3*a^5*b^3 - a^4*b^4)*tan(x)^ 
2), 1/6*(3*(a^5*tan(x)^4 + 2*a^4*b*tan(x)^2 + a^3*b^2)*sqrt(a - b)*arctan( 
2*sqrt(a - b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/(a*tan(x)^2 - a + 2*b 
)) + 2*(3*(a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*tan(x)^5 + 3*(2*a^4*b - 9* 
a^3*b^2 + 11*a^2*b^3 - 4*a*b^4)*tan(x)^3 + (3*a^3*b^2 - 17*a^2*b^3 + 22*a* 
b^4 - 8*b^5)*tan(x))*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(a^6*b^2 - 3*a^5*b^3 
 + 3*a^4*b^4 - a^3*b^5 + (a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)*tan(x)^4 + 
2*(a^7*b - 3*a^6*b^2 + 3*a^5*b^3 - a^4*b^4)*tan(x)^2)]
 
3.1.58.6 Sympy [F]

\[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int \frac {\tan ^{2}{\left (x \right )}}{\left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac {5}{2}}}\, dx \]

input
integrate(tan(x)**2/(a+b*cot(x)**2)**(5/2),x)
 
output
Integral(tan(x)**2/(a + b*cot(x)**2)**(5/2), x)
 
3.1.58.7 Maxima [F]

\[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int { \frac {\tan \left (x\right )^{2}}{{\left (b \cot \left (x\right )^{2} + a\right )}^{\frac {5}{2}}} \,d x } \]

input
integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="maxima")
 
output
integrate(tan(x)^2/(b*cot(x)^2 + a)^(5/2), x)
 
3.1.58.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 537 vs. \(2 (123) = 246\).

Time = 0.36 (sec) , antiderivative size = 537, normalized size of antiderivative = 3.81 \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\frac {{\left (3 \, a^{4} \sqrt {b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 3 \, a^{3} \sqrt {-a + b} b \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 3 \, a^{3} b^{\frac {3}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 6 \, a^{4} \sqrt {b} - 18 \, a^{3} b^{\frac {3}{2}} + 16 \, a^{2} \sqrt {-a + b} b^{2} + 2 \, a^{2} b^{\frac {5}{2}} - 26 \, a \sqrt {-a + b} b^{3} + 20 \, a b^{\frac {7}{2}} + 10 \, \sqrt {-a + b} b^{4} - 10 \, b^{\frac {9}{2}}\right )} \mathrm {sgn}\left (\sin \left (x\right )\right )}{6 \, {\left (a^{6} \sqrt {-a + b} \sqrt {b} - a^{6} b - 3 \, a^{5} \sqrt {-a + b} b^{\frac {3}{2}} + 3 \, a^{5} b^{2} + 3 \, a^{4} \sqrt {-a + b} b^{\frac {5}{2}} - 3 \, a^{4} b^{3} - a^{3} \sqrt {-a + b} b^{\frac {7}{2}} + a^{3} b^{4}\right )}} - \frac {\frac {2 \, {\left (\frac {{\left (9 \, a^{5} b^{2} - 23 \, a^{4} b^{3} + 19 \, a^{3} b^{4} - 5 \, a^{2} b^{5}\right )} \cos \left (x\right )^{2}}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}} - \frac {3 \, {\left (3 \, a^{5} b^{2} - 5 \, a^{4} b^{3} + 2 \, a^{3} b^{4}\right )}}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}}\right )} \cos \left (x\right )}{{\left (a \cos \left (x\right )^{2} - b \cos \left (x\right )^{2} - a\right )} \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}} + \frac {3 \, \log \left ({\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {-a + b}} + \frac {12 \, \sqrt {-a + b}}{{\left ({\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2} - a\right )} a^{2}}}{6 \, \mathrm {sgn}\left (\sin \left (x\right )\right )} \]

input
integrate(tan(x)^2/(a+b*cot(x)^2)^(5/2),x, algorithm="giac")
 
output
1/6*(3*a^4*sqrt(b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 3*a^3*sqrt(-a 
+ b)*b*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - 3*a^3*b^(3/2)*log(-a - 2*s 
qrt(-a + b)*sqrt(b) + 2*b) + 6*a^4*sqrt(b) - 18*a^3*b^(3/2) + 16*a^2*sqrt( 
-a + b)*b^2 + 2*a^2*b^(5/2) - 26*a*sqrt(-a + b)*b^3 + 20*a*b^(7/2) + 10*sq 
rt(-a + b)*b^4 - 10*b^(9/2))*sgn(sin(x))/(a^6*sqrt(-a + b)*sqrt(b) - a^6*b 
 - 3*a^5*sqrt(-a + b)*b^(3/2) + 3*a^5*b^2 + 3*a^4*sqrt(-a + b)*b^(5/2) - 3 
*a^4*b^3 - a^3*sqrt(-a + b)*b^(7/2) + a^3*b^4) - 1/6*(2*((9*a^5*b^2 - 23*a 
^4*b^3 + 19*a^3*b^4 - 5*a^2*b^5)*cos(x)^2/(a^8 - 3*a^7*b + 3*a^6*b^2 - a^5 
*b^3) - 3*(3*a^5*b^2 - 5*a^4*b^3 + 2*a^3*b^4)/(a^8 - 3*a^7*b + 3*a^6*b^2 - 
 a^5*b^3))*cos(x)/((a*cos(x)^2 - b*cos(x)^2 - a)*sqrt(-a*cos(x)^2 + b*cos( 
x)^2 + a)) + 3*log((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + 
a))^2)/((a^2 - 2*a*b + b^2)*sqrt(-a + b)) + 12*sqrt(-a + b)/(((sqrt(-a + b 
)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + a))^2 - a)*a^2))/sgn(sin(x))
 
3.1.58.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\tan ^2(x)}{\left (a+b \cot ^2(x)\right )^{5/2}} \, dx=\int \frac {{\mathrm {tan}\left (x\right )}^2}{{\left (b\,{\mathrm {cot}\left (x\right )}^2+a\right )}^{5/2}} \,d x \]

input
int(tan(x)^2/(a + b*cot(x)^2)^(5/2),x)
 
output
int(tan(x)^2/(a + b*cot(x)^2)^(5/2), x)